with Interfaces; use Interfaces;
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
with IO;
with Block; use Block;

package body Parser_Filter is
   overriding procedure Found_Element(This : in out ID_Filter_Type; E : in Element_Type) is

   begin
      if This.ID = E.ID then
         This.Result.Append(E);
      end if;
   end;

   overriding procedure Found_Element(This : in out Print_Filter_Type; E : in Element_Type) is
      function Depth_Marker(D : in Positive) return String is
         Result : constant String(1..D) := (others=> '-');
      begin
         return Result;
      end Depth_Marker;
      pragma inline(Depth_Marker);
      begin
      Put_Line(Depth_Marker(E.Depth) & "Found Element: " & To_String(E.EBML_Type.Description));
      Put_Line(Depth_Marker(E.Depth) & "is Type: " & Element_Content_Type'Image(E.EBML_Type.Content));
      Put_Line(Depth_Marker(E.Depth) & "length: " & Element_Size_Type'Image(E.Size));
      Put_Line(Depth_Marker(E.Depth) & "content at file index: " & Stream_IO.Positive_Count'Image(E.File_Index));
   end;


end Parser_Filter;